#include "data.h"

#include <QSqlDatabase>
#include <QSqlQuery>

Mission::Mission(int id,
                 const QString& brief,
                 const QString& code,
                 const QString& mark,
                 const QString& rocketModel,
                 const QString& coordinate,
                 const QString& method,
                 const QString& launchPoint,
                 double launchAzimuth,
                 double launchLongitude,
                 double launchLatitude,
                 double launchAltitude,
                 QDateTime launchTime,
                 const QList<std::tuple<QString, double>>& uniquePoint,
                 const QList<std::tuple<QString, QString, double, double>>& taskSegment)
    : id(id)
    , brief(brief)
    , code(code)
    , mark(mark)
    , rocketModel(rocketModel)
    , coordinate(coordinate)
    , method(method)
    , launchPoint(launchPoint)
    , launchAzimuth(launchAzimuth)
    , launchLongitude(launchLongitude)
    , launchLatitude(launchLatitude)
    , launchAltitude(launchAltitude)
    , launchTime(launchTime)
    , uniquePoint(uniquePoint)
    , taskSegment(taskSegment)
{
}

Station::Station(const QString& name, double longitude, double latitude)
    : name(name)
    , longitude(longitude)
    , latitude(latitude)
{
}

EquipmentData::EquipmentData(const QString& equipmentName,
                             const QString& stationName,
                             double T,
                             double A,
                             double E,
                             double AGC,
                             double SNR)
    : equipmentName(equipmentName)
    , stationName(stationName)
    , T(T)
    , A(A)
    , E(E)
    , AGC(AGC)
    , SNR(SNR)
{
}

int Data::currentMissionId;

const QList<Mission> Data::missions = {};
const QList<Station> Data::stations = {};
const QList<EquipmentData> Data::equipmentData = {};
